


import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:xim/common/get_style_view.dart';
import 'package:xim/config/store_config.dart';

class WelcomeLoginController extends GetxStateMixinController<bool>{

  final isEnableFingerprintLogin = false.obs;

  var focusNode = FocusNode();

  final password = "".obs;

  @override
  Future<bool?> dataInit() async {
    isEnableFingerprintLogin.value = (await StoreApi.instance.isEnableFingerprintLogin())??false;
    return isEnableFingerprintLogin.value;
  }

  updateIsEnableFingerprintLogin(bool? status){
    if(status!=null){
      isEnableFingerprintLogin.value = status;
      update();
    }
  }

  void missFocus(){
    focusNode.unfocus();
  }

  updatePassword(String val){
    password.value = val;
    update();
  }

  @override
  void dispose() {
    super.dispose();
    focusNode.dispose();
  }

}